<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
.div1{width:200px; height:200px; background:red; border-right:10px solid #000;}
.div2{width:200px; height:200px; background-color:green;}
</style>
</head>

<body>
<div class="div1"></div>
<div class="div2"></div>
border是加在div之外的而不是之内
</body>
</html>
